package com.lc.pianostudent.conn;

import android.animation.FloatEvaluator;

import com.lc.pianostudent.bean.CommentsBean;
import com.lc.pianostudent.bean.PraiseBean;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Created by Administrator on 2018/2/22.
 */
@HttpInlet(Conn.POST_RELEASE)
public class PostRelease extends BaseAsyPost<Object> {

    public String user_id,content,type,state;
    public  List<File> img;
    public PostRelease(AsyCallBack asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected PostReleaseInfo parser(JSONObject object) throws Exception {
        if (object.optString("code").equals("200")) {

            PostReleaseInfo info = new PostReleaseInfo();

            info.code = object.optString("code");
            info.message = object.optString("message");

            TOAST = object.optString("message");
            return info;

        } else {

            TOAST = object.optString("message");

        }

        return null;
    }

    public static class PostReleaseInfo {

        public String code,message;


    }
    @Override
    protected String fieldKey(String fieldName, int position) {
        return fieldName + (position + 1);
    }
}
